﻿<%@ Page Title="" Language="C#" AutoEventWireup="true" CodeFile="Registration.aspx.cs" Inherits="Register" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Your Invocemanager</title>
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
    <script type="text/javascript">

        jQuery(function ($) {

            // simple jQuery validation script
            $('#login').submit(function () {

                var valid = true;
                var errormsg = 'This field is required!';
                var errorcn = 'error';

                $('.' + errorcn, this).remove();

                $('.required', this).each(function () {
                    var parent = $(this).parent();
                    if ($(this).val() == '') {
                        var msg = $(this).attr('title');
                        msg = (msg != '') ? msg : errormsg;
                        $('<span class="' + errorcn + '">' + msg + '</span>')
                            .appendTo(parent)
                            .fadeIn('fast')
                            .click(function() { $(this).remove(); });
                        valid = false;
                    };
                });
                return valid;
            });
        })	
</script>
    <link href="Log_Reg.css" rel="stylesheet" type="text/css" />
<body>
    <form id="login" runat="server">
    <div>
        <asp:image ID="Image1" runat="server" alt="Invoice manager" longdesc="Invoice manager" ImageUrl="~/Images/Logo.jpg" />
    </div>
    <p class="register">
        <a href="login.aspx">Login</a>
    </p>
    <div>
        <label for="name"> Name</label>
        <asp:TextBox ID="tb_name" runat="server" class="field required" title="Please provide your name"></asp:TextBox>
    </div>
    <div>
        <label for="secondname"> Secondname</label>
        <asp:TextBox ID="tb_sec_name" runat="server" class="field required" title="Please provide your secondname" ></asp:TextBox>
    </div>
    <div>
        <label for="e_mail"> E-mail</label>
        <asp:TextBox ID="tb_email" runat="server" class="field required" title="Please provide your E-mail"></asp:TextBox>
    </div>
    <div>
        <label for="licence"> Licence type</label>
        <asp:DropDownList ID="drop_licence" runat="server" class="field required" title="Please provide your licence type"></asp:DropDownList>
    </div>
    <div>
        <label for="username"> Username</label>
        <asp:TextBox ID="tb_login" runat="server" class="field required" title="Please provide your username"></asp:TextBox>
    </div>
    <div>
        <label for="password"> Password</label>
        <asp:TextBox ID="tb_passwrd" runat="server" TextMode="Password" class="field required" title="Password is required"></asp:TextBox>
    </div>
    <div class="submit">
        <asp:Button ID="bt_register" Text="Register" runat="server" onclick="bt_register_Click"/>
    </div>
    <p class="back">
        <asp:Literal Text="Registration successful!" runat="server" Visible="false" ID="Message" />    
    </p>
    </form>
</body>
</html>

